﻿using BwTMusicModels;
using HwjUIDI.Utility.DatabaseHelper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BwTMusicServices.Order
{
    public class OrderServices
    {
        public int AddAOrderInfo(North_Order order,out Guid key)
        {
            int bResult = 0;
            key = Guid.NewGuid();
            try
            {
                string sql = $"insert into North_Order (OrderId,OrderTime,OrderCustomer,OrderKey,OrderItem,OrderType,OrderNote) values('{Guid.NewGuid()}','{order.OrderTime}','{order.OrderCustomer}','{key}','{order.OrderItem}','{order.OrderType}','{order.OrderNote}')";
                bResult = DatabaseFactory.GetDatabase().ExecNonQuerySQL(sql);
            }
            catch (Exception ex)
            {

            }         
            return bResult;
        }
    }
}
